<!DOCTYPE html>






  


<html class="theme-next pisces use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.2.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.2.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.2.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.2.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.2.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '6.2.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '884IXKDARU',
      apiKey: '73268cbd2090d14ab01f9fd7b9874762',
      indexName: 'hexo-blogs',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta property="og:type" content="website">
<meta property="og:title" content="Linkscue&#39;s blogs">
<meta property="og:url" content="http://linkscue.com/page/4/index.html">
<meta property="og:site_name" content="Linkscue&#39;s blogs">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linkscue&#39;s blogs">



  <link rel="alternate" href="/atom.xml" title="Linkscue's blogs" type="application/atom+xml" />




  <link rel="canonical" href="http://linkscue.com/page/4/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>Linkscue's blogs</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left 
  page-home">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Linkscue's blogs</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">清風有情君意愜, 夢徊怡江詩心緣。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>




<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />关于</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档</a>
  </li>

      
      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />搜索</a>
        </li>
      
    </ul>
  

  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup search-popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/28/google-code-access-not-allowed/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/28/google-code-access-not-allowed/" itemprop="url">
                  Google Code Access Not Allowed 解决方法
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-28 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-28T00:00:00+08:00">2015-05-28</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 09:57:15" itemprop="dateModified" datetime="2018-03-12T09:57:15+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>&emsp;&emsp;很久以前，还年轻，不清楚Google Code是不允许托放一些文件（即当网盘来使用） 导致后来Google Code帐号被不知情的情况下，被封了，每次想打开code.google.com上的项目时，要以隐身模式打开，或是退出登录，或是用其他帐号来访问，感觉非常麻烦。</p>
<p>&emsp;&emsp;想到这与cookies有关系，于是乎就下手去查了一下Cookies，发现没有几个Cookies，很快就定位到了与 NID的值有关联。通过Google Chrome 应用商店，找到 <a href="http://www.editthiscookie.com/" target="_blank" rel="noopener">EditThisCookie</a>{:target=”brank”}，新增屏蔽规则：</p>
<table>
<thead>
<tr>
<th>域名</th>
<th>名称</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>code.google.com</td>
<td>NID</td>
<td>any</td>
</tr>
</tbody>
</table>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/21/iptables-tips/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/21/iptables-tips/" itemprop="url">
                  Iptables使用小技巧
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-21 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-21T00:00:00+08:00">2015-05-21</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 09:57:15" itemprop="dateModified" datetime="2018-03-12T09:57:15+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h3 id="1-转发本地端口"><a href="#1-转发本地端口" class="headerlink" title="1. 转发本地端口"></a>1. 转发本地端口</h3><p>转发本地端口到指定端口，如转发80端口到2000</p>
<pre><code>sudo iptables -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 2000
</code></pre><h3 id="2-转发本地端口至远程端口"><a href="#2-转发本地端口至远程端口" class="headerlink" title="2. 转发本地端口至远程端口"></a>2. 转发本地端口至远程端口</h3><p>这个我们可以简单理解为端口映射，路由器经常这么干</p>
<pre><code># 200.200.137.235:52345 &lt;==&gt; 200.200.137.172:12345
sudo iptables -t nat -A PREROUTING -p tcp --dport 52345 -j DNAT --to-destination 200.200.137.172:12345
sudo iptables -t nat -A POSTROUTING -p tcp --dport 12345 -j MASQUERADE
</code></pre><p>当然，还要以使用ssh来实现这个功能：</p>
<pre><code># 操作PC: 200.200.137.235
autossh -NfL  0.0.0.0:52345:200.200.137.172:12345 lwq@localhost

# 操作PC： 200.200.137.172
autossh -NfR  0.0.0.0:52345:localhost:12345 lwq@200.200.137.235
</code></pre><h3 id="3-作为网关"><a href="#3-作为网关" class="headerlink" title="3. 作为网关"></a>3. 作为网关</h3><p>比如我期望 200.200.88.70 能够作为网关让大家可以畅游互联网</p>
<pre><code>sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -s 200.200.88.0/22 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE # tun0是ssh_vpn打开的网口
</code></pre><h3 id="4-Ubuntu-WiFi热点"><a href="#4-Ubuntu-WiFi热点" class="headerlink" title="4. Ubuntu WiFi热点"></a>4. Ubuntu WiFi热点</h3><p>360 WiFi共享热点方法: <a href="https://github.com/yajin/360-wifi-linux" target="_blank" rel="noopener">360-wifi-linux</a></p>
<pre><code>sudo iptables -t nat -A POSTROUTING -s ${subnet}.0/24 -o $out_interface -j MASQUERADE
sudo iptables -A FORWARD -s ${subnet}.0/24 -o $out_interface -j ACCEPT
sudo iptables -A FORWARD -d ${subnet}.0/24 -m conntrack --ctstate ESTABLISHED,RELATED -i $out_interface -j ACCEPT
</code></pre><h3 id="5-限制QQ上网"><a href="#5-限制QQ上网" class="headerlink" title="5. 限制QQ上网"></a>5. 限制QQ上网</h3><pre><code>#星期一到星期六的8:00-12:30禁止qq通信 
iptables -I FORWARD -p udp --dport 53 -m string --string &quot;tencent&quot; -m time --timestart 8:15 --timestop 12:30 --days Mon,Tue,Wed,Thu,Fri,Sat -j DROP 
iptables -I FORWARD -p udp --dport 53 -m string --string &quot;TENCENT&quot; -m time --timestart 8:15 --timestop 12:30 --days Mon,Tue,Wed,Thu,Fri,Sat -j DROP 
#星期一到星期六的8:00-12:30禁止qq通信 
iptables -I FORWARD -p udp --dport 53 -m string --string &quot;tencent&quot; -m time --timestart 13:30 --timestop 20:30 --days Mon,Tue,Wed,Thu,Fri,Sat -j DROP 
iptables -I FORWARD -p udp --dport 53 -m string --string &quot;TENCENT&quot; -m time --timestart 13:30 --timestop 20:30 --days Mon,Tue,Wed,Thu,Fri,Sat -j DROP 
#星期一到星期六的8:00-12:30禁止qq网页 
iptables -I FORWARD -s 192.168.0.0/24 -m string --string &quot;qq.com&quot; -m time --timestart 8:15 --timestop 12:30 --days Mon,Tue,Wed,Thu,Fri,Sat -j DROP 
iptables -I FORWARD -s 192.168.0.0/24 -m string --string &quot;qq.com&quot; -m time --timestart 13:00 --timestop 20:30 --days Mon,Tue,Wed,Thu,Fri,Sat -j DROP 
</code></pre><h3 id="6-限制指定字符串"><a href="#6-限制指定字符串" class="headerlink" title="6. 限制指定字符串"></a>6. 限制指定字符串</h3><pre><code>#禁止ay2000.net，宽频影院，色情，广告网页连接 ！但中文 不是很理想
iptables -I FORWARD -s 192.168.0.0/24 -m string --string &quot;ay2000.net&quot; -j DROP 
iptables -I FORWARD -d 192.168.0.0/24 -m string --string &quot;宽频影院&quot; -j DROP 
iptables -I FORWARD -s 192.168.0.0/24 -m string --string &quot;色情&quot; -j DROP 
iptables -I FORWARD -p tcp --sport 80 -m string --string &quot;广告&quot; -j DROP 

#可以通过 hex 来限制，因为编码是很多种的，通常UTF和GB2312做一下限制
iptables -A FORWARD -p udp --dport 53 -m string --hex-string &quot;|00 00 ff 00 01|&quot; --to 255 --algo bm -m comment --comment &quot;IN ANY?&quot; -j DROP
</code></pre><h3 id="7-限制流量"><a href="#7-限制流量" class="headerlink" title="7. 限制流量"></a>7. 限制流量</h3><pre><code>iptables -A INPUT -p icmp -m limit --limit 3/s
</code></pre>
          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/20/bash-git-aliases-complete/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/20/bash-git-aliases-complete/" itemprop="url">
                  Git Aliases Tab补全
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-20 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-20T00:00:00+08:00">2015-05-20</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 09:57:15" itemprop="dateModified" datetime="2018-03-12T09:57:15+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>很喜欢zsh的git aliases，也希望带到其他电脑上使用，或Windows上的Git使用；</p>
<p>于是乎研究了一下Git aliases在Bash下的自动补全，发现确实可行，所以分享一下给大家；</p>
<p>创建文件 <code>~/.bash_aliases.git</code>，包含以下内容：</p>
<pre><code>__linux_git_complete_file=/usr/share/bash-completion/completions/git
__windows_git_complete_file=/etc/bash_completion.git
__host_os_type=$(uname -sm)

case ${__host_os_type:0:5} in
    Linux)
        __current_git_complete_file=$__linux_git_complete_file
        ;;
    MINGW)
        __current_git_complete_file=$__windows_git_complete_file
        ;;
    *)
        echo &quot;Warning: .bash_alias.git unknow host os type !&quot;
        ;;
esac

test -e $__current_git_complete_file &amp;&amp; source $__current_git_complete_file

unset __host_os_type
unset __linux_git_complete_file
unset __windows_git_complete_file
unset __current_git_complete_file

# Aliases
alias g=&apos;git&apos;
alias gst=&apos;git status&apos;
alias gd=&apos;git diff&apos;
alias gdc=&apos;git diff --cached&apos;
alias gl=&apos;git pull&apos;
alias gup=&apos;git pull --rebase&apos;
alias gp=&apos;git push&apos;
alias gc=&apos;git commit -v&apos;
alias gc!=&apos;git commit -v --amend&apos;
alias gca=&apos;git commit -v -a&apos;
alias gca!=&apos;git commit -v -a --amend&apos;
alias gcmsg=&apos;git commit -m&apos;
alias gco=&apos;git checkout&apos;
alias gcm=&apos;git checkout master&apos;
alias gr=&apos;git remote&apos;
alias grv=&apos;git remote -v&apos;
alias grmv=&apos;git remote rename&apos;
alias grrm=&apos;git remote remove&apos;
alias grset=&apos;git remote set-url&apos;
alias grup=&apos;git remote update&apos;
alias grbi=&apos;git rebase -i&apos;
alias grbc=&apos;git rebase --continue&apos;
alias grba=&apos;git rebase --abort&apos;
alias gb=&apos;git branch&apos;
alias gba=&apos;git branch -a&apos;
alias gcount=&apos;git shortlog -sn&apos;
alias gcl=&apos;git config --list&apos;
alias gcp=&apos;git cherry-pick&apos;
alias glg=&apos;git log --stat --max-count=10&apos;
alias glgg=&apos;git log --graph --max-count=10&apos;
alias glgga=&apos;git log --graph --decorate --all&apos;
alias glo=&apos;git log --oneline --decorate --color&apos;
alias glog=&apos;git log --oneline --decorate --color --graph&apos;
alias gss=&apos;git status -s&apos;
alias ga=&apos;git add&apos;
alias gm=&apos;git merge&apos;
alias grh=&apos;git reset HEAD&apos;
alias grhh=&apos;git reset HEAD --hard&apos;
alias gclean=&apos;git reset --hard &amp;&amp; git clean -dfx&apos;
alias gwc=&apos;git whatchanged -p --abbrev-commit --pretty=medium&apos;

#remove the gf alias
#alias gf=&apos;git ls-files | grep&apos;

alias gpoat=&apos;git push origin --all &amp;&amp; git push origin --tags&apos;
alias gmt=&apos;git mergetool --no-prompt&apos;

alias gg=&apos;git gui citool&apos;
alias gga=&apos;git gui citool --amend&apos;
alias gk=&apos;gitk --all --branches&apos;

alias gsts=&apos;git stash show --text&apos;
alias gsta=&apos;git stash&apos;
alias gstp=&apos;git stash pop&apos;
alias gstd=&apos;git stash drop&apos;

# Will cd into the top of the current repository
# or submodule.
alias grt=&apos;cd $(git rev-parse --show-toplevel || echo &quot;.&quot;)&apos;

# Git and svn mix
alias git-svn-dcommit-push=&apos;git svn dcommit &amp;&amp; git push github master:svntrunk&apos;

alias gsr=&apos;git svn rebase&apos;
alias gsd=&apos;git svn dcommit&apos;
#
# Will return the current branch name
# Usage example: git pull origin $(current_branch)
#
function current_branch() {
  ref=$(git symbolic-ref HEAD 2&gt; /dev/null) || \
  ref=$(git rev-parse --short HEAD 2&gt; /dev/null) || return
  echo ${ref#refs/heads/}
}

function current_repository() {
  ref=$(git symbolic-ref HEAD 2&gt; /dev/null) || \
  ref=$(git rev-parse --short HEAD 2&gt; /dev/null) || return
  echo $(git remote -v | cut -d&apos;:&apos; -f 2)
}

# these aliases take advantage of the previous function
alias ggpull=&apos;git pull origin $(current_branch)&apos;
alias ggpur=&apos;git pull --rebase origin $(current_branch)&apos;
alias ggpush=&apos;git push origin $(current_branch)&apos;
alias ggpnp=&apos;git pull origin $(current_branch) &amp;&amp; git push origin $(current_branch)&apos;

# these alias ignore changes to file
alias gignore=&apos;git update-index --assume-unchanged&apos;
alias gunignore=&apos;git update-index --no-assume-unchanged&apos;
# list temporarily ignored files
alias gignored=&apos;git ls-files -v | grep &quot;^[[:lower:]]&quot;&apos;

# Git Aliases AutoComplete
type __git_complete &gt;/dev/null 2&gt;&amp;1 &amp;&amp; {
    __git_complete   g        _git
    __git_complete   gd       _git_diff
    __git_complete   gdc      _git_diff
    __git_complete   gl       _git_pull
    __git_complete   gup      _git_pull
    __git_complete   gp       _git_push
    __git_complete   gc       _git_commit
    __git_complete   gc!      _git_commit
    __git_complete   gca      _git_commit
    __git_complete   gca!     _git_commit
    __git_complete   gcmsg    _git_commit
    __git_complete   gco      _git_checkout
    __git_complete   gcm      _git_checkout
    __git_complete   gr       _git_remote
    __git_complete   grv      _git_remote
    __git_complete   grmv     _git_remote
    __git_complete   grrm     _git_remote
    __git_complete   grset    _git_remote
    __git_complete   grup     _git_remote
    __git_complete   grbi     _git_rebase
    __git_complete   grbc     _git_rebase
    __git_complete   grba     _git_rebase
    __git_complete   gb       _git_branch
    __git_complete   gba      _git_branch
    __git_complete   gcount   _git_shortlog
    __git_complete   gcl      _git_config
    __git_complete   gcp      _git_cherry_pick
    __git_complete   glg      _git_log
    __git_complete   glgg     _git_log
    __git_complete   glgga    _git_log
    __git_complete   glo      _git_log
    __git_complete   glog     _git_log
    __git_complete   gss      _git_log
    __git_complete   ga       _git_add
    __git_complete   gm       _git_merge
    __git_complete   grh      _git_reset
    __git_complete   grhh     _git_reset
    __git_complete   gwc      _git_whatchanged
    __git_complete   gmt      _git_mergetool
    __git_complete   gk       _gitk
    __git_complete   gsts     _git_stash
    __git_complete   gsta     _git_stash
    __git_complete   gstp     _git_stash
    __git_complete   gstd     _git_stash
    __git_complete   gsr      _git_svn
    __git_complete   gsd      _git_svn
}
</code></pre><p>然后，再让 <code>~/.bashrc</code> 去包含这个文件：</p>
<pre><code>echo &apos;test -e ~/.bash_aliases.git &amp;&amp; . ~/.bash_aliases.git&apos; &gt;&gt; ~/.bashrc
</code></pre><p>然后使用类似命令<code>gd</code>、<code>gst</code>、<code>ga</code>和<code>gc</code>等命令简写时，会非常顺手，Enjoy！</p>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/20/android-bootup/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/20/android-bootup/" itemprop="url">
                  课程3: Android启动过程分析
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-20 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-20T00:00:00+08:00">2015-05-20</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-11 13:11:15" itemprop="dateModified" datetime="2018-03-11T13:11:15+08:00">2018-03-11</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/课程/" itemprop="url" rel="index"><span itemprop="name">课程</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="相关技术文章"><a href="#相关技术文章" class="headerlink" title="相关技术文章"></a>相关技术文章</h1><p>首先参阅一下别人写得很不错的文章，个人感觉还是有很多可以借鉴的内容</p>
<h2 id="1-Android启动过程深入解析-原文链接"><a href="#1-Android启动过程深入解析-原文链接" class="headerlink" title="1.  Android启动过程深入解析 原文链接"></a>1.  Android启动过程深入解析 <a href="http://blog.jobbole.com/67931/" target="_blank" rel="noopener">原文链接</a></h2><p>当然，小伙伴们若是英文足够好，可以直接查看：<a href="http://kpbird.blogspot.com/2012/11/in-depth-android-boot-sequence-process.html" target="_blank" rel="noopener">英文原文</a></p>
<p><img src="/assets/Courses/Courses03_android_boot_squence.png" alt="Android_bootup1"></p>
<p>我们先来粗略查看一下文章要点</p>
<p>####第一步：启动电源以及系统启动</p>
<blockquote>
<p>当电源按下，引导芯片代码开始从预定义的地方（固化在ROM）开始执行。</p>
</blockquote>
<p>####第二步：引导程序</p>
<blockquote>
<p>引导程序是运行的第一个程序，因此它是针对特定的主板与芯片的；</p>
</blockquote>
<blockquote>
<p>引导程序是OEM厂商或者运营商加锁和限制的地方;</p>
</blockquote>
<p>####第三步：内核</p>
<blockquote>
<p>Android内核与桌面linux内核启动的方式差不多。</p>
</blockquote>
<p>####第四步：init进程</p>
<blockquote>
<p>init进程有两个责任，一是挂载目录，比如/sys、/dev、/proc，二是运行init.rc脚本</p>
</blockquote>
<p>####第五步：Zygote</p>
<blockquote>
<p>Zygote让Dalvik虚拟机共享代码、低内存占用以及最小的启动时间成为可能。</p>
</blockquote>
<blockquote>
<p>Zygote是一个虚拟器进程，正如我们在前一个步骤所说的在系统引导的时候启动。Zygote预加载以及初始化核心库类。</p>
</blockquote>
<p>####第六步：系统服务或服务</p>
<blockquote>
<p>系统服务同时使用native以及java编写，系统服务可以认为是一个进程。</p>
</blockquote>
<blockquote>
<p>系统服务包含了所有的System Services。</p>
</blockquote>
<blockquote>
<p>Zygote创建新的进程去启动系统服务。你可以在ZygoteInit类的”startSystemServer”方法中找到源代码。</p>
</blockquote>
<p>####第七步：引导完成</p>
<blockquote>
<p><code>ACTION_BOOT_COMPLETED</code> 启动已完成的广播</p>
</blockquote>
<p>备注：在init.rc上还可以使用<code>on property:dev.bootcomplete=1</code>来处理你期望开机完成后做爱做的事情</p>
<h2 id="2-Android启动分析-原文链接"><a href="#2-Android启动分析-原文链接" class="headerlink" title="2. Android启动分析 原文链接"></a>2. Android启动分析 <a href="http://blog.csdn.net/dlmu2001/article/details/6537304" target="_blank" rel="noopener">原文链接</a></h2><p>由于前一篇文章，在<code>system_server或services</code>上讲解不够深入，现在利用这一篇文章来粗略讲解一下</p>
<p>关于这个文章的英文原文: <a href="http://www.phonesdevelopers.com/1695827/" target="_blank" rel="noopener">链接: Android Start Up</a></p>
<p>接下来这一段，我是依据 <a href="http://blog.csdn.net/dlmu2001/article/details/6537304#t8" target="_blank" rel="noopener">链接: 2.3服务启动过程</a> 来讲解有关 <code>system_server</code>和<code>Services</code>的内容</p>
<p>####1. <code>daemons</code>和<code>Zygote</code></p>
<blockquote>
<p>1) <code>init.rc</code>启动类似<code>adbd</code>, <code>debuggerd</code>, <code>rild</code>等核心后台进程，用于监听指定信息</p>
</blockquote>
<blockquote>
<p>2) <code>Zygote</code>是用于初始化虚拟机的进程，监听请求创建虚拟机实例的socket，算是App的“鼻祖”</p>
</blockquote>
<p><img src="/assets/Courses/Courses03_android_bootup_01.gif" alt="2.1_init.rc_daemons_zygote" title="Android 启动分析：Daemons和Zygote"></p>
<p>####2. <code>Services Manager</code></p>
<p>在 <a href="http://androidxref.com/4.4_r1/xref/system/core/rootdir/init.rc#448" target="_blank" rel="noopener">init.rc</a> 有这么一段内容</p>
<pre><code>service servicemanager /system/bin/servicemanager
    class core
    user system
    group system
    critical
    onrestart restart healthd
    onrestart restart zygote
    onrestart restart media
    onrestart restart surfaceflinger
    onrestart restart drm
</code></pre><blockquote>
<p>init.rc启动Service Manager，注册为Binder服务缺省的context manager，处理服务注册和监听</p>
</blockquote>
<p><img src="/assets/Courses/Courses03_android_bootup_02.gif" alt="2.2_init.rc_servicemanager" title="Android 启动分析：Services Manager"></p>
<p>####3. <code>system_server</code></p>
<p>system_server是由Zygote分裂出来的一个进程(而非原文所说的由Runtime拉起)</p>
<p><code>争议</code>：这里原文可能是针对较低版本的，经过分析源码，正确的应该是 <a href="http://images.cnitblog.com/blog/563439/201309/25154945-40c8b0ec63774e02af485973a4c05c45.png" target="_blank" rel="noopener">链接: system_server启动流程</a></p>
<p><img src="/assets/Courses/Courses03_android_bootup_04.gif" alt="system_server_start_up_seq_bad"></p>
<p>####4. <code>System server</code> init1和init2</p>
<p>在<code>system_server</code>起来之后，它调用了<code>init1</code>和<code>init2</code></p>
<blockquote>
<p>init1: 拉起了<code>SurfaceFlinger</code>和<code>AudioFlinger</code>等（与硬件层交互的服务，主要是C/C++代码）</p>
</blockquote>
<p><img src="/assets/Courses/Courses03_android_bootup_05.gif" alt="init1" title="init1"></p>
<p>####5. 原生<code>server sevices</code>向<code>service manager</code>注册为IPC服务目标</p>
<p>比如AudioFlinger.cpp的instantiate函数</p>
<blockquote>
<p>init2: 拉起了<code>Activity Manager</code>和<code>Window Manager</code>等（与应用层、框架层交互的服务，主要是Java代码）</p>
</blockquote>
<p><img src="/assets/Courses/Courses03_android_bootup_06.gif" alt="init2" title="init2"></p>
<p>####6. <code>Android managed services</code></p>
<p>SystemServer.java的run函数</p>
<p><img src="/assets/Courses/Courses03_android_bootup_07.gif" alt="Managed Services"></p>
<p>####7. <code>Android managed services</code>向<code>service manager</code>注册</p>
<p><img src="/assets/Courses/Courses03_android_bootup_08.gif" alt="Managed Services"></p>
<p>####8. <code>system_server</code>加载所有的服务后，系统初始化完成</p>
<p><img src="/assets/Courses/Courses03_android_bootup_09.gif" alt="system_server"></p>
<p>####9. 桌面程序</p>
<p><code>ActivityManagerService.java</code>的<code>startHomeActivityLocked</code></p>
<p><img src="/assets/Courses/Courses03_android_bootup_10.gif" alt="HomeActivity"></p>
<p>####10.其他App在自己进程中启动</p>
<p><img src="/assets/Courses/Courses03_android_bootup_11.gif" alt="OtherActivity"></p>
<h2 id="3-图解Android-Zygote-System-Server-启动分析-原文链接"><a href="#3-图解Android-Zygote-System-Server-启动分析-原文链接" class="headerlink" title="3. 图解Android - Zygote, System Server 启动分析 原文链接"></a>3. 图解Android - Zygote, System Server 启动分析 <a href="http://www.cnblogs.com/samchen2009/p/3294713.html" target="_blank" rel="noopener">原文链接</a></h2><p>这绝对是一篇好文，写得很精彩</p>
<p>相应的，这个博主的Github相关链接: <a href="https://github.com/samchen2009/android_uml" target="_blank" rel="noopener">android_url</a></p>
<p>我对这里的<code>system_server</code>启动流程比较感兴趣，这里只贴出<code>system_server</code>相关的启动流程图</p>
<h4 id="system-server启动流程图"><a href="#system-server启动流程图" class="headerlink" title="system_server启动流程图"></a><code>system_server</code>启动流程图</h4><p><img src="/assets/Courses/Courses03_android_bootup_systemServer.png" alt="SystemServerUml" title="Android 启用分析: SystemServer启动流程图"></p>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/11/android-internal/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/11/android-internal/" itemprop="url">
                  课程3: Android系统知识(一)
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-11 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-11T00:00:00+08:00">2015-05-11</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 10:01:09" itemprop="dateModified" datetime="2018-03-12T10:01:09+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/课程/" itemprop="url" rel="index"><span itemprop="name">课程</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="Android系统知识"><a href="#Android系统知识" class="headerlink" title="Android系统知识"></a>Android系统知识</h1><p>这一部分主要针对Androi系统整个框架，列出几个重要的Android系统关系图，进行讲解一下；</p>
<p>因为Android基于Linux内核，所以先从Linux基础开始讲解，然后再逐渐引入Android系统框架；</p>
<h3 id="Linux-Kernel-Map"><a href="#Linux-Kernel-Map" class="headerlink" title="Linux Kernel Map"></a>Linux Kernel Map</h3><p>Linux Kernel Map这一张图主要是针对开发人员提供的，有兴趣的童鞋可以大致了解一下；</p>
<p><img src="/assets/Courses/Courses03_android_internal_02.LKM3_1024.png" alt="Linux-Kernel-Map"></p>
<p><a href="http://www.makelinux.net/kernel_map/" target="_blank" rel="noopener">源链接</a></p>
<p>若对Android Kernel与Linux Kernel的差异感兴趣，可以参考这里 <a href="http://www.lindusembedded.com/blog/2010/12/07/android-linux-kernel-additions/" target="_blank" rel="noopener">ANDROID LINUX KERNEL ADDITIONS</a></p>
<p>简单列举如下：</p>
<ul>
<li><code>binder</code>:                             进程通信驱动</li>
<li><code>ashmem</code>:                             匿名共享内存驱动</li>
<li><code>pmem</code>:                               process memory allocator</li>
<li><code>logger</code>:                             打印日志驱动</li>
<li><code>wake locks</code>:                         一但有用户层、或Kernel拿到此锁就阻止手机进入低功耗状态</li>
<li><code>early suspend</code>:                      Linux电源管理的扩展，LCD、重力感应、传感器依赖于它才能在睡眠时工作；</li>
<li><code>oom handling</code>:                       android out of memory killer, 内存管理（以前Android手机内存很小，这个很有必要）</li>
<li><code>android alarm</code>:                      闹钟服务，允许用户空间控制闹钟</li>
<li><code>android paranoid network security</code>:  通过uid控制网络访问权限</li>
<li><code>android timed output/gpio</code>:          暴露定时gpio模块到用户空间，供震动模块调用</li>
<li><code>android ram console</code>:                允许保存一部分printk信息到一小段内存上<code>/proc/last_kmsg</code>，方便调试</li>
<li><code>other android differences</code>:          yaffs2, bluetooth, scheduleer, adb</li>
</ul>
<h3 id="Map-of-GNU-Linux-OS-Internals"><a href="#Map-of-GNU-Linux-OS-Internals" class="headerlink" title="Map of GNU/Linux OS Internals"></a>Map of GNU/Linux OS Internals</h3><p>这是一张GNU/Linux系统各层调用关系图，利用它，我们可以进一步完善SSLVPN、VMP和VDC等案例的设计；</p>
<p><img src="/assets/Courses/Courses03_android_internal_01.GNU_Linux_OS_internals.png" alt="Linux-OS-Internel"></p>
<p><a href="http://www.makelinux.net/system/GNU_Linux_OS_internals.png" target="_blank" rel="noopener">源链接</a></p>
<h3 id="Android-Internal"><a href="#Android-Internal" class="headerlink" title="Android Internal"></a>Android Internal</h3><p>这一部分是Android系统各层间调用关系图</p>
<p>在我们遇到一些问题不容易排解的时候，看此图，上下左右关系看一看，就能找到答案了</p>
<p><img src="/assets/Courses/Courses03_android_internal_03.Android_internals.png" alt="Android-Internal"></p>
<p><a href="http://www.makelinux.net/android/internals/Android_internals_1024.png" target="_blank" rel="noopener">源链接</a></p>
<h3 id="Android-System-Architecture"><a href="#Android-System-Architecture" class="headerlink" title="Android System Architecture"></a>Android System Architecture</h3><p>这一部分是Android系统结构图，来自于Google Android官网</p>
<p><img src="/assets/Courses/Courses03_android_internal_05.Android-system-architecture.jpg" alt="Android System Architecture"></p>
<p><a href="https://developer.android.com/images/system-architecture.jpg" target="_blank" rel="noopener">源链接</a></p>
<h3 id="Android-API-Classes"><a href="#Android-API-Classes" class="headerlink" title="Android API Classes"></a>Android API Classes</h3><p><img src="/assets/Courses/Courses03_android_internal_04.Android_API_Classes.png" alt="Android API Classes"></p>
<p><a href="http://www.makelinux.net/android/classes/zoom" target="_blank" rel="noopener">源链接</a></p>
<h3 id="更多"><a href="#更多" class="headerlink" title="更多"></a>更多</h3><p>更多可以查看此<a href="http://www.makelinux.net/resources" target="_blank" rel="noopener">链接</a></p>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/10/android-logcat-all/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/10/android-logcat-all/" itemprop="url">
                  Android抓取所有日志
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-10 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-10T00:00:00+08:00">2015-05-10</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 09:43:40" itemprop="dateModified" datetime="2018-03-12T09:43:40+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>总有些时候我们会遇到非必现场景，若未及时抓取日志，可能为时已晚</p>
<h3 id="抓取日志"><a href="#抓取日志" class="headerlink" title="抓取日志"></a>抓取日志</h3><ol>
<li><p>抓取Logcat日志</p>
<p>这个是最简单的，使用-f重定向到一个文本文件即可，<code>-v threadtime</code>则显示详细时间和进程</p>
<pre><code># for logcat
{
        log -t logcat_all &quot;start logcat to file: $logcat_file&quot;
            /system/bin/logcat -v threadtime -f $logcat_file
}   &amp;
</code></pre></li>
<li><p>抓取Kmsg日志</p>
<p>通过抓取<code>/proc/kmsg</code>来完成</p>
<pre><code># for kmsg
{
        log -t logcat_all &quot;start kmsg to file: $kmsg_logfile&quot;
            cat /proc/kmsg &gt;$kmsg_logfile
}   &amp;
</code></pre></li>
<li><p>抓取Top日志</p>
<p>通过抓取Top可以看到系统运行时，占用CPU的情况等等</p>
<pre><code># for top
{
    while busybox true; do
        top_newtime=$(/system/bin/date +%F_%H-%M-%S)
        top_logfile=$logcat_dir/top_${top_newtime}.log &amp;&amp; &gt; $top_logfile
        log -t logcat_all &quot;start top to file: $top_logfile&quot;
        # 仅保留5个top日志文件
        # 5*100*3=25分钟内的Top信息，避免Top日志文件过大
        busybox rm -f $(busybox ls -1t ${logcat_dir}/top_* | busybox tail -n +6)
        for n in $(busybox seq 1 100) ; do
            # 每3秒打印一次top信息，并加入时间显示
            top -m 5 -d 3 -t -n 1 | busybox awk &apos;{now=strftime(&quot;%Y-%M-%d %T &quot;); print now $0}&apos; &gt;&gt;$top_logfile
            echo &gt;&gt;$top_logfile
        done
    done
}   &amp;
</code></pre><p>为了方便分析结果，这里添加了详细时间，同时限定了Top输出大小（避免SD卡占用过快）</p>
</li>
<li><p>抓取vmstat日志</p>
<p>通过抓取vmstat日志，可分析的系统信息就更多了</p>
<pre><code># for vmstat
{
    while busybox true; do
        log -t logcat_all &quot;start vmstat_ to file: $vmstat_logfile&quot;
        vmstat_newtime=$(/system/bin/date +%F_%H-%M-%S)
        vmstat_logfile=$logcat_dir/vmstat_${vmstat_newtime}.log &amp;&amp; &gt; $vmstat_logfile
        busybox rm -f $(busybox ls -1t ${logcat_dir}/vmstat_* | busybox tail -n +6)
        /system/bin/vmstat -d 3 -n 100 | busybox awk &apos;{now=strftime(&quot;%Y-%M-%d %T &quot;); print now $0}&apos; &gt;$vmstat_logfile 2&gt;&amp;1
    done
}   &amp;
</code></pre><p>同时也添加了详细的时间输出，方便分析</p>
</li>
</ol>
<h3 id="开机运行"><a href="#开机运行" class="headerlink" title="开机运行"></a>开机运行</h3><p>在<code>init.rc</code>添加一个Service，当系统已正常启动完成时，执行抓取日志</p>
<pre><code>service logcat_all /system/bin/logcat_wrapper.sh
        class main
        disabled
        oneshot

on property:dev.bootcomplete=1
    start logcat_all
</code></pre><p>其中，<code>logcat_wrapper.sh</code>内容如下：</p>
<pre><code>#!/system/bin/sh
{
        /system/bin/busybox nohup /system/bin/logcat_all.sh &gt; /dev/null 2&gt;&amp;1 &amp;
}   &amp;
</code></pre><p>使用nohup执行，避免脚本被杀死，而<code>logcat_all.sh</code>则见此链接 <a href="https://gist.github.com/scue/fbbfdf9e09fe805ff041" target="_blank" rel="noopener">logcat_all.sh</a></p>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/09/eclipse-import-project-from-android-studiothen-app-crash-solution/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/09/eclipse-import-project-from-android-studiothen-app-crash-solution/" itemprop="url">
                  Android Studio迁移闪退
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-09 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-09T00:00:00+08:00">2015-05-09</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 10:41:14" itemprop="dateModified" datetime="2018-03-12T10:41:14+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>很久没有撸Android App开发了～<br>最近把一个月前通过反编译、二次修改的 <a href="https://code.csdn.net/myscue/droidsshd/tree/lyh_eclipse" target="_blank" rel="noopener">Android SSHD</a>  项目进行简单修改一下；<br>突然发现迁移项目时，报了一个错误，同时还出现了闪退情况：</p>
<pre><code>04-29 20:20:11.493: W/dalvikvm(23964): threadid=1: thread exiting with uncaught exception (group=0x41b2cc50)
04-29 20:20:11.543: E/StubController(23964): service = null
</code></pre><p>感觉像是迁移过程中没完整导致的，解决方法很简单，<strong>就是把java目录重命名为src即可</strong>；</p>
<p><img src="/assets/images/292045497241929.png" alt="solution"></p>
<p><a href="https://code.csdn.net/myscue/droidsshd/commit/70d72506802f4d0034b62889a6c6d28f29a6b217" target="_blank" rel="noopener">历史提交记录</a></p>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/09/my-android-adt-eclipse/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/09/my-android-adt-eclipse/" itemprop="url">
                  Eclipse ADT定制
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-09 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-09T00:00:00+08:00">2015-05-09</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 09:57:15" itemprop="dateModified" datetime="2018-03-12T09:57:15+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <ol>
<li><p>配置自动补全：</p>
<p>Windows -&gt; preferences -&gt; 搜索assist，修改 java xml自动触发补全：</p>
<pre><code>.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
</code></pre></li>
<li><p>自动补全插件：</p>
<p><a href="http://www.cnblogs.com/sunjie21/archive/2012/06/28/2567463.html" target="_blank" rel="noopener">Eclipse Tab自动补全</a></p>
<p>Windows -&gt; Preference -&gt; 搜索 Assist，C/C++、Java、XML都输入（或追加）：</p>
<pre><code>.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
</code></pre><p>直接替换文件方法：</p>
<pre><code># 备份文件
find eclipse/plugins -name \*jface.text\* -exec mv -v {} {}.bak \;
# 复制文件到
eclipse/plugins/org.eclipse.jface.text_3.8.2.v20121126-164145.jar #(要相同版本才可以)
</code></pre></li>
<li><p>修改边框过大以及颜色配置：</p>
<p>3.1.   修改提示框背景颜色：</p>
<p>路径：/usr/share/themes/Greybird/gtk-2.0/gtkrc 修改：</p>
<pre><code>gtk-color-scheme    = &quot;tooltip_bg_color:#f2edbc\ntooltip_fg_color:#000000&quot; # Tooltips.
</code></pre><p>3.2.   修改全局背景颜色：</p>
<pre><code>gtk-color-scheme    = &quot;bg_color:#cce8cf\nselected_bg_color:#398ee7\nbase_color:#fcfcfc&quot; # Background, base.
</code></pre><p>3.3.   修改eclispe背景颜色：</p>
<pre><code>windows-&gt;Preferences-&gt;General-&gt;Editor-&gt;Text Editors-&gt;Backgroud color修改成#fcfcfc
</code></pre><p>3.4.   边框过大的调整方法</p>
<pre><code>cd /path/to/adt
vi &quot;$(find eclipse -name e4_default_gtk.css)&quot;
# 打开： plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css，找到并修改：
 .MPartStack {
    font-size: 9;
    font-family: Liberation Sans;
    swt-tab-renderer: null;
    swt-tab-height: 22px;
    swt-selected-tabs-background: #FFFFFF #ECE9D8 100%;
    swt-simple: false;
    swt-mru-visible: false;
 }
# 原始内容：
.MPartStack {
    font-size: 11;
    swt-simple: false;
    swt-mru-visible: false;
}
</code></pre><p>3.5.   Logcat 字体大小： Android → Logcat位置</p>
</li>
<li><p>崩溃解决方法：</p>
<p>打开 eclipse/configuration/config.ini 文件， 在最后一行添加</p>
<pre><code>org.eclipse.swt.browser.DefaultType=mozilla
</code></pre><p>参考博客： <a href="http://www.cnblogs.com/scue/p/4461845.html" target="_blank" rel="noopener">Eclipse崩溃总结</a></p>
</li>
<li><p>Eclipse快捷键：</p>
<p>vi ~/.local/share/applications/eclipse.desktop </p>
<p>Sample1:</p>
<pre><code>[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=eclipse.png
Exec=&quot;/media/Study/Program Files/adt-bundle-linux-x86_64-20131030/eclipse/eclipse&quot;
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse
</code></pre><p>Sample2: for <code>ubuntu 15.04</code></p>
<pre><code>[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Eclipse
Comment=Eclipse IDE
Type=Application
Exec=env JAVA_HOME=/home/sinfor/apt/jdk1.7.0_67 /media/Study/android/eclipse/eclipse_luna_scue/eclipse
Icon=/home/sinfor/.local/share/icons/adt.png
</code></pre></li>
</ol>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/05/07/android-unit-tests/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/05/07/android-unit-tests/" itemprop="url">
                  课程2: Android单元测试
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-05-07 00:00:00" itemprop="dateCreated datePublished" datetime="2015-05-07T00:00:00+08:00">2015-05-07</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-12 09:57:15" itemprop="dateModified" datetime="2018-03-12T09:57:15+08:00">2018-03-12</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/课程/" itemprop="url" rel="index"><span itemprop="name">课程</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="Android单元测试"><a href="#Android单元测试" class="headerlink" title="Android单元测试"></a>Android单元测试</h1><h2 id="Java单元测试："><a href="#Java单元测试：" class="headerlink" title="Java单元测试："></a>Java单元测试：</h2><ul>
<li><p>解决的问题：使用单元测试，对一个方法进行测试，通常包括 正确性、错误性、边界性等测试，从源头上解决缺陷引入；</p>
</li>
<li><p>使用方法：这只是一个Demo，我们部门还没有得到有力的推广（敏捷测试理论上更需要单元测试，但我们项目时间都比较紧）；</p>
<pre><code>./junit_gen.sh &lt;项目目录&gt; # 然后填写测试代码到Test.java
./test_on_android.sh
</code></pre></li>
<li><p>详情请参考： <a href="http://200.200.0.36/28120/junit_test_android/tree/linux" target="_blank" rel="noopener">链接</a></p>
</li>
</ul>
<p>####Java覆盖率报告：</p>
<ul>
<li><p>解决的问题：看看到底我们测试到了哪里，哪些我们覆盖到了？</p>
</li>
<li><p>使用方法：emma，编译时应该输入参数 ant emma debug，这由Android SDK已实现；</p>
</li>
<li><p>详情请参考： <a href="http://200.200.0.36/28120/junit_test_android/blob/linux/test_on_android.sh#L112" target="_blank" rel="noopener">链接</a></p>
</li>
</ul>
<p>####Java单测总体报告：</p>
<ul>
<li>解决的问题：现阶段的单元测试（Junit）并没有生成一份Jenkins可识别的报告，这里是解决Jenkins识别不到的问题；</li>
<li>详情请参考： <a href="http://200.200.0.36/28120/junit_test_android/blob/linux/android-junit-report-1.5.8.jar" target="_blank" rel="noopener">链接</a></li>
</ul>
<p>####Java单测 - 效果展示：</p>
<pre><code>[Java单测效果](http://200.200.0.36/28120/junit_test_android/tree/linux/ScreenShot)
</code></pre><h2 id="NDK单元测试：（C-C-）"><a href="#NDK单元测试：（C-C-）" class="headerlink" title="NDK单元测试：（C/C++）"></a>NDK单元测试：（C/C++）</h2><ul>
<li><p>解决的问题：与Java单元测试类似，但是针对的是NDK（C/C++），NDK的一个明显的好处是它的安全性要比Java的好；</p>
</li>
<li><p>使用方法：这是一个简单的Demo</p>
<ul>
<li>注意到 <code>sangfor_android</code>目录</li>
<li>Jni代码放置到 <code>sangfor_android/jni</code></li>
<li>测试代码添加到 <code>demo_unit.cpp</code></li>
<li>然后执行 <code>./run_linux.sh</code> 即可</li>
</ul>
</li>
<li><p>详情请参考： <a href="http://200.200.0.36/28120/gtest_android_ndk/tree/all_in_one" target="_blank" rel="noopener">链接</a></p>
</li>
<li><p>注意事项：采用是gtest，它提供了很多测试实例，我们可以去学习一下 <a href="http://200.200.0.36/28120/gtest_android_ndk/tree/all_in_one/gtest-1.7/samples" target="_blank" rel="noopener">Gtest模板</a></p>
</li>
</ul>
<p>####NDK覆盖率报告：</p>
<ul>
<li><p>解决的问题：覆盖率报告可以让我们清楚的知道，哪一行代码被执行了多少次</p>
</li>
<li><p>使用方法：<code>./gen_gcov_html.sh &lt;源码目录&gt;</code></p>
<pre><code>./gen_gcov_html.sh sangfor_android
</code></pre></li>
<li><p>详情请参考： <a href="http://200.200.0.36/28120/gtest_android_ndk/blob/all_in_one/gen_gcov_html.sh" target="_blank" rel="noopener">链接</a></p>
</li>
</ul>
<h2 id="创新分享："><a href="#创新分享：" class="headerlink" title="创新分享："></a>创新分享：</h2><p>主要讲解一下思路来源，拿到问题之后怎么思考去解决它</p>
<p>分享一下思维，不具体深入讲解如何实现（具体实现包含在创新文章里边了）。</p>

          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://linkscue.com/2015/04/28/android-check-string-res/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="linkscue(scue)">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/assets/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Linkscue's blogs">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2015/04/28/android-check-string-res/" itemprop="url">
                  Android字符串资源检查
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2015-04-28 00:00:00" itemprop="dateCreated datePublished" datetime="2015-04-28T00:00:00+08:00">2015-04-28</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-03-11 13:11:07" itemprop="dateModified" datetime="2018-03-11T13:11:07+08:00">2018-03-11</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>Android项目开发过程中，容易出现缺少对应中英文翻译的情况，这个Python脚本是用于检查字符串是否缺少了对应的翻译</p>
<p>脚本链接：</p>
<p><a href="htps://gist.github.com/scue/0ad950803038d9eab634" target="_blank" rel="noopener">Android字符串资源检查</a></p>
<p>使用方法：</p>
<pre><code>./check_string_res.py packages/apps/Settings/
./check_string_res.py packages/apps/Settings/ packages/apps/QuickSearchBox/ ..
</code></pre><p>效果如下：</p>
<pre><code>$ ./check_string_res.py packages/apps/Bluetooth/

###正在检查项目packages/apps/Bluetooth/

&gt;&gt;&gt; Checking res/values/strings.xml file ..
  - Warning: string name &apos;auth_notif_message&apos; not found!!!
  - Warning: string name &apos;auth_notif_ticker&apos; not found!!!
  - Warning: string name &apos;auth_notif_title&apos; not found!!!
  - Warning: string name &apos;cancel&apos; not found!!!
  - Warning: string name &apos;defaultname&apos; not found!!!
  - Warning: string name &apos;localPhoneName&apos; not found!!!
  - Warning: string name &apos;ok&apos; not found!!!
  - Warning: string name &apos;pbap_authentication_timeout_message&apos; not found!!!
  - Warning: string name &apos;pbap_session_key_dialog_header&apos; not found!!!
  - Warning: string name &apos;pbap_session_key_dialog_title&apos; not found!!!
  - Warning: string name &apos;unknownName&apos; not found!!!

&gt;&gt;&gt; Checking res/values-zh-rCN/strings.xml file ..
  - Warning: string name &apos;auth_notif_message&apos; not found!!!
  - Warning: string name &apos;auth_notif_ticker&apos; not found!!!
  - Warning: string name &apos;auth_notif_title&apos; not found!!!
  - Warning: string name &apos;bluetooth_share_file_name&apos; not found!!!
  - Warning: string name &apos;cancel&apos; not found!!!
  - Warning: string name &apos;defaultname&apos; not found!!!
  - Warning: string name &apos;localPhoneName&apos; not found!!!
  - Warning: string name &apos;ok&apos; not found!!!
  - Warning: string name &apos;pbap_authentication_timeout_message&apos; not found!!!
  - Warning: string name &apos;pbap_session_key_dialog_header&apos; not found!!!
  - Warning: string name &apos;pbap_session_key_dialog_title&apos; not found!!!
  - Warning: string name &apos;unknownName&apos; not found!!!
</code></pre>
          
        
      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
  </section>

  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/page/3/"><i class="fa fa-angle-left" aria-label="上一页"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/3/">3</a><span class="page-number current">4</span><a class="page-number" href="/page/5/">5</a><a class="extend next" rel="next" href="/page/5/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
  </nav>



          </div>
          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/assets/images/avatar.png"
                alt="linkscue(scue)" />
            
              <p class="site-author-name" itemprop="name">linkscue(scue)</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">43</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">3</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">29</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/scue" target="_blank" title="GitHub"><i class="fa fa-fw fa-github"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="mailto:scue@vip.qq.com" target="_blank" title="邮箱"><i class="fa fa-fw fa-envelope"></i>邮箱</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://weibo.com/scue" target="_blank" title="微博"><i class="fa fa-fw fa-weibo"></i>微博</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://www.douban.com/people/scue/" target="_blank" title="豆瓣"><i class="fa fa-fw fa-book"></i>豆瓣</a>
                  
                </span>
              
            </div>
          

          
          

          
          

          
            
          
          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">linkscue(scue)</span>

  

  
</div>




  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动 v3.6.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/theme-next/hexo-theme-next">NexT.Pisces</a> v6.2.0</div>




        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.2.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.2.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.2.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.2.0"></script>



  

  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.2.0"></script>



  



	





  





  










  




  
  
  
  <link rel="stylesheet" href="/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/js/src/algolia-search.js?v=6.2.0"></script>



  

  

  

  
  

  
  
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
  

  


  
  

  

  

  

  

  

</body>
</html>
